using Game.Main.Model;

namespace Game.Component
{
	public class LinkRopeItem : HadRopeItem
	{
		public override void Init(ItemArchiveData data)
		{
			base.Init(data);
		}

		public override void ResetState()
		{
			base.ResetState();
			InitPlaceItem();
		}

		protected override void LateUpdate()
		{
			base.LateUpdate();
			UpdatePutBackAnim();
		}

		public override void TouchDown(TouchEventData touchEventData)
		{
			base.TouchDown(touchEventData);
			needBack = true;
		}

		public override void TouchUp(TouchEventData touchEventData)
		{
			base.TouchUp(touchEventData);
			if (parentItem != null && typeof(CharacterItem).IsAssignableFrom(parentItem.GetType()))
			{
				needBack = false;
			}
			else
			{
				PutBackPlaceItem();
			}
		}
	}
}
